﻿using guanli.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using guanli.Entity;

namespace guanli.Controllers
{
    public class DengLuController : Controller
    {
        //
        // GET: /DengLu/
        public DataBase dataBase = new DataBase();
        public ActionResult Index()
        {
            return View();
        }
        [AcceptVerbs(HttpVerbs.Post)]
        [HttpPost]
        public ActionResult Index(UserRegister f)
        {
            if (dataBase.userPanDuan(f.Username,f.Password))
            {
                ViewBag.message = "登陆成功";
                return View();
            }
            ViewBag.message = "账号密码不正确";

                return View();

            //return RedirectToAction("Index", "Home");
        }
    }
}
